package com.yc.spring;

import com.yc.spring.demo.Hello;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringDemo {
    public static void main(String[] args) {
        // 基于XML上下文(应用环境)对象
        ClassPathXmlApplicationContext cxt;
        cxt = new ClassPathXmlApplicationContext("beans.xml");
        Hello bean = cxt.getBean(Hello.class);
        bean.sayHello();
    }
}
